import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import UI_Router from './components/UI_Router.vue'
import Contacts from './components/Contacts.vue'
import About from './components/About.vue'
import All_contacts from './components/child/All_contacts.vue'
import Alice from './components/child/Alice.vue'
import Bob from './components/child/Bob.vue'
import Blog from './components/child/children/Blog.vue'
import Fax from './components/child/children/Fax.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/ui_router'
  },
  {
    path: '/ui_router',
    component: UI_Router
  },
  {
    path: '/contacts',
    component: Contacts,
    children: [
      {
        path: 'all_contacts',
        component: All_contacts
      },
      {
        path: 'alice',
        component: Alice
      },
      {
        path: 'bob',
        component: Bob,
        children: [

          {
            path: 'blog',
            component: Blog
          },
          {
            path: 'fax',
            component: Fax
          },
        ]
      },
    ]
  },
  {
    path: '/about',
    component: About
  },
]
const router = new VueRouter({
  routes,
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
